package exe2;

/**
 * @author oldliu
 * @since 1.0
 */
public class QQ {
    String no;
    String nickname;
    int days;//在线天数
    public void online(){
        //days+=n
        days++;
    }
    //算等级
    public void calcLevel(){
        //计算等级
        int sun=0,guan=0,star=0;
        //days
        guan=days/(100*3*3);
        sun=(days-100*3*3*guan)/(100*3);
        star=days%300/100;
        System.out.println("当前QQ号："+no);
        if(guan>0)
            System.out.print(guan+"个皇冠 ");
        if(sun>0)
            System.out.print(sun+"个太阳 ");
        if(star>0)
            System.out.print(star+"个星星");
        System.out.println();
    }
    public void show(){
        System.out.println("QQ号"+no+",昵称"+nickname);
        calcLevel();
    }
}
